import { name, hello as bazHello } from './module.js'
console.log(name)
bazHello()
// 模块暴露的成员是只读的
// name = 100 // Assignment to constant variable.

import { fooName, default as fooHello } from './module2.js'
console.log(fooName)
fooHello()

// 导入模块默认成员
import barName from './module3.js'
// 等同于：
// import { default as barName } from './module3.js'
console.log(barName)

import {count} from './module4.js'
setTimeout(function() {
  console.log(count)
}, 3000)

import barCount from './module5.js'
setTimeout(function() {
  console.log(barCount.count)
}, 3000)
